/**
 * @author NGUYEN Van Tho
 */

package ifi.p17;

import ifi.p17.controler.Control;
import ifi.p17.model.Model;
import ifi.p17.view.MainView;
import ifi.p17.view.ViewAddNewPerson;
import ifi.p17.view.ViewListPerson;

import java.awt.CardLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;

public class Carnet implements Runnable{
	
	public static void main (String[] args){
		EventQueue.invokeLater(new Carnet());
	}
	
	@Override
    public void run() {		
		
		Model model = new Model();
		Control control = new Control(model);
		MainView mainView = new MainView(control);
		control.setMainView(mainView);
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.add(mainView);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
    }
//	private void createUI(){
//		
//	}
}
